package com.jfinal.bloglist.model;

import com.jfinal.plugin.activerecord.Model;

import java.util.List;

/**
 * Title:
 * Description:
 *
 * @version 2.0
 * @author: Yung Fu(FUYUNGCN AT GMAIL DOT com)
 * @since: 14-10-11 下午10:54
 */
public class BlogType extends Model<BlogType> {

    public final static BlogType dao  = new BlogType();

    /**
     * 一对多
     * 通过blog_type表id查询出所有blog信息
     *
     * @return List<Blog>
     */
    public List<Blog> getBlogList() {
        return Blog.dao.find("select * from blog where t_id = ?", get("id"));
    }
}
